package com.mc.lp.database.entity;

import javax.persistence.Cacheable;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.Cache;
import org.hibernate.annotations.CacheConcurrencyStrategy;

@Cacheable
@Cache(usage=CacheConcurrencyStrategy.READ_ONLY)
@Entity
@Table(name = "T_SUBJECT")
public class SubjectEntity extends MicroCampusBaseEntity {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Column(name = "SUBJECT_NAME")
	private String subjectName;
	
	@OneToOne(fetch=FetchType.EAGER)
	@JoinColumn(name = "SUBJECT_CATEGORY_ID")
	private SubjectCategoryEntity subjectCategoryEntity;

	public String getSubjectName() {
		return subjectName;
	}

	public void setSubjectName(String subjectName) {
		this.subjectName = subjectName;
	}

	public SubjectCategoryEntity getSubjectCategoryEntity() {
		return subjectCategoryEntity;
	}

	public void setSubjectCategoryEntity(SubjectCategoryEntity subjectCategoryEntity) {
		this.subjectCategoryEntity = subjectCategoryEntity;
	}

}
